Skip to content

Spike: AES67 receive and record (#1235) - #1236

Merged
Skeyelab merged 2 commits into
mainfrom
spike/aes67-1235
Nov 15, 2026
Merged

Skeyelab merged 2 commits into
mainfrom
spike/aes67-1235

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

Closes #1235. Part of #1234.

A throwaway spike under spikes/aes67/, outside App/, Packages/ and the project files. A small Swift package receives one AES67 stream (RTP L24, 48 kHz, 8 channels, 1 ms packets, multicast 239.x) and writes one 24-bit WAV per channel. A Python sender goes with it (GStreamer isn't installed), plus a bit-exact WAV checker. spikes/aes67/FINDINGS.md answers the issue's four questions.

Measured on this Mac (loopback multicast only, no real network or Dante hardware)

  • 10-minute run, 8 channels: 600,000 packets, 0 lost, 0 reordered, 0 gaps. All 8 WAVs bit-exact at 28,800,000 frames each.
  • CPU: 1.9% of one M5 Pro core.
  • Jitter: p99 81 µs, max 9.8 ms (the Python sender's own stalls).
  • Drift: -0.02 ppm against monotonic time.
  • Fault injection: I made the sender drop, swap and duplicate packets. The receiver's counts match exactly (20 lost, 198 reordered, 39 duplicates), and the gaps are silence with no sample shift.
  • ffmpeg as an independent sender: 2 channels at its own packet sizes, right pitch and channel order. This rules out a byte-order bug that my sender and receiver could share.

Answers in FINDINGS.md

  • PTP: a record-only receiver doesn't need it. RTP timestamps place the samples. The mediaclk offsets line up several flows, provided they share a grandmaster.
  • 32 channels (4 flows): about 40 Mbit/s, roughly 8% of one Mac core as written, 4.6 MB/s to disk.
  • iOS port: needs the multicast entitlement, a USB-C Ethernet adapter, and a check of background behavior on a device.
  • Effort and verdict: realistic. About 4-5 weeks once the entitlement and test hardware are in hand.

Tests

  • 8 unit tests in the spike package: SDP, RTP, wraparound, reorder, gap, duplicate, WAV bytes. They passed on their first run; I didn't watch a red run first.
  • VERIFY_QUICK=1 ./scripts/verify.sh passed.
  • The spike has only run on the Mac over loopback, not on an iPhone or a real network.

Swift receiver (SDP, multicast join, reorder by RTP timestamp, gaps as
silence, one 24-bit WAV per channel), a Python L24 sender with fault
injection, and a bit-exact WAV checker. FINDINGS.md has the status so far.

Assisted-by: Claude
@Skeyelab
Skeyelab enabled auto-merge (squash) November 15, 2026 20:58
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Skeyelab
Skeyelab merged commit 4af9475 into main Nov 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AES67 spike: receive one AES67 stream and record it to WAV (#1234)

1 participant